﻿using SimpleMath.MySimpleMath;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace SimpleMath
{
    public partial class FormDistanceBetweenPoints : Form
    {
        public FormDistanceBetweenPoints()
        {
            InitializeComponent();
        }

        private void btnCalculate_Click(object sender, EventArgs e)
        {
            double p1x = double.Parse(tbP1X.Text);
            double p1y = double.Parse(tbP1Y.Text);
            double p2x = double.Parse(tbP2X.Text);
            double p2y = double.Parse(tbP2Y.Text);
            double dist = MySimpleMath.Geometry.GetDistanceBetweenTwoPoint(new PointD(p1x, p1y), new PointD(p2x, p2y));
            tbResult.Text = dist.ToString();
        }
    }
}
